With further miniaturization of semiconductor devices such as MOS transistors in recent years, element isolation regions need to be further miniaturized. To achieve further miniaturization of element isolation regions, a trench element isolation technique is considered. According to the trench element isolation technique, trenches are provided in a substrate between semiconductor elements, and dielectric material is filled in the trenches to isolate the semiconductor elements from one another.